Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta: do not create tag when there are no public changes #414

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

suft
Copy link
Contributor

@suft suft commented Dec 18, 2024

Check list

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation

Description

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation change

Test environment

  • Shell
    • bash
    • zsh
    • fish
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:

@suft
Copy link
Contributor Author

suft commented Dec 18, 2024

Do we want to check all the commit messages between the last tag and head for the Meta prefix?
If all are Meta we exit else we create a new tag.

If that's the case I have the fix stashed and I can update this PR with that approach.

@suft suft marked this pull request as ready for review December 18, 2024 19:50
@sandr01d
Copy link
Collaborator

Hey @suft, thanks for helping out with this!

Do we want to check all the commit messages between the last tag and head for the Meta prefix?
If all are Meta we exit else we create a new tag.

If that's the case I have the fix stashed and I can update this PR with that approach.

Yes, I think that is the behavior we'd want. Ideally we'd match the Meta prefix case insensitive.

@suft suft force-pushed the meta-no-tags branch 2 times, most recently from 3032809 to 67a1aad Compare December 18, 2024 21:52
@carlfriedrich
Copy link
Collaborator

Thanks @suft for your take on this. While this is definitely a quick fix for the problem, I do not find it optimal because it duplicates the logic we already have in changelog.sh.
In order to keep the code DRY I would prefer combining the two scripts into one, since tagging and releasing should always go hand in hand anyway.
I can offer to implement this, as I already have the idea in mind, but I think I won't have time for this until after Christmas.

@carlfriedrich
Copy link
Collaborator

@suft Thanks again for your update. The new version won't work, unfortunately, because the output of the tag creation goes to stdout, which means that it will land in the CHANGELOG.md file, which is not what we want.

Furthermore, the name of the script changelog.sh does not reflect its extended functionality anymore.

Now that I think more about it, though, I think the two scripts might still be separate, but we should only reduce the two workflows into one. The Tag step then should have the same if: steps.changelog.outcome == 'success' conditional as the Release step in order to execute it only when there are public changes. This will keep the code clean and DRY while still sticking to the single responsibility principle.

My offer is still valid, I can implement this myself during the next days. If you @suft are motivated, though, feel free to continue on this. Your effort is very much appreciated! 🙏

@carlfriedrich
Copy link
Collaborator

Another thing just came to my mind: there was a reason we had the tag and release actions separate, and that is we want to have the possibility to trigger custom releases by creating a tag manually. So the new combined workflow should also support this (i.e. triggered on tag creation and create tag only if it does not exist, yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing forgit-24.12.0.tar.gz for 24.12.0 tag
3 participants